package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.jetbrains.annotations.NotNull;

/**
 * 
 * @TableName tz_msg
 */
@TableName(value ="tz_msg")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Msg implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long msgId;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 企业名称
     */
    @NotBlank(message = "公司名称不可为空")
    private String company;

    /**
     * 
     */
    @NotBlank(message = "留言不可为空")
    private String content;

    /**
     * 
     */
    @NotNull("留言类型不可为空")
    private Long msgTypeId;

    @TableField(exist = false)
    private String msgTypeName;

    @NotBlank(message = "手机号码")
    private String phone;
    @NotBlank(message = "联系人")
    private String username;

    /**
     * 产品id
     */
    private Long prodId;

    /**
     * 0咨询中1已完结
     */
    private Integer status;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 0不对外1对外
     */
    private Integer pub;

    private Integer replay;

    @TableField(exist = false)
    private String brief;
    @TableField(exist = false)
    private String prodName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        return "Msg{" +
                "msgId=" + msgId +
                ", userId='" + userId + '\'' +
                ", company='" + company + '\'' +
                ", content='" + content + '\'' +
                ", msgTypeId=" + msgTypeId +
                ", msgTypeName='" + msgTypeName + '\'' +
                ", phone='" + phone + '\'' +
                ", username='" + username + '\'' +
                ", prodId=" + prodId +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", pub=" + pub +
                ", replay=" + replay +
                '}';
    }
}